home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-01-10 | 2.1 KB | 71 lines | [TEXT/MSWD] |
- (Set Modem Clock procedure by Dick Kriss, KD5VU 07-Jan-87 for the Magic Modem
- (to work with a Mac Plus (Chooser Clock set for 24 hour time). One of
- (the interesting things about this procedure is it read the Mac's time and
- (converts the format to the way the Magic wants to see it. The Magic format to
- (set the time is "AT*T=MM/DD/HH/MMA OR MMP (the A = AM & P = PM)
- (The is a modification to Ray Terry's clock set procedure for the AEA PK-232
- (R.Kriss, GEnie; KD5VU @ KB5PM, packet radio; kriss@austin.lockheed.com
- (---------------------This is the real stuff --------------------)
- (Set CRAWL ON while debugging, OFF when finished
- CRAWL OFF
- (A% reserved to get Year, the Magic Modem 1200 does not ask for the year
- (Get the month and pad with a "0" to get 2 digits required.)
- GETGLOBAL B%,5
- NUMTOSTRING B%,B$
- TEST B% <= 9
- IF YES CONCAT O$,B$
- TEST B% <= 9
- IF YES COPYINTO B$,O$
- (Get the date and pad to get two digitis.)
- GETGLOBAL C%,6
- NUMTOSTRING C%,C$
- COPYINTO O$,0
- TEST C% <= 9
- IF YES CONCAT O$,C$
- TEST C% <= 9
- IF YES COPYINTO C$,O$
- (Get the hour and pad as necessary to convert from 24 hr time to 12 hrs.)
- GETGLOBAL D%,8
- (Convert 24 hours to 12 hour
- TEST D% > 12
- IF YES SUBTRACT D%,12
- NUMTOSTRING D%,D$
- COPYINTO O$,0
- TEST D% <= 9
- IF YES CONCAT O$,D$
- IF YES COPYINTO D$,O$
- (At this point you have a number_string 00 to 12 without regard to AM or PM
- (Get the minutes and pad if necessary.)
- GETGLOBAL E%,9
- NUMTOSTRING E%,E$
- COPYINTO O$,0
- TEST E% <= 9
- IF YES CONCAT O$,E$
- TEST E% <= 9
- IF YES COPYINTO E$,O$
- (Get the 24 hour time again to determine If AM or PM and add A or P to E$.)
- (This will set a Flag to be be added to E$)
- GETGLOBAL F%,8
- TEST F% <=11
- IF YES COPYINTO F$,Y
- IF NO COPYINTO F$,N
- CONTAINS F$,Y
- IF YES CONCAT E$,A
- CONTAINS F$,N
- IF NO CONCAT E$,P
- (Jam all this stuff together in one string variable called B$.)
- CONCAT B$,/
- CONCAT B$,C$
- CONCAT B$,/
- CONCAT B$,D$
- CONCAT B$,/
- CONCAT B$,E$
- (Enter the Magic 1200 Modem Command to set the time.)
- TYPE ^c
- TYPE AT*T=
- TYPE B$
- TYPE ^M
- (All done...)
- (Now compile this using RR10.3 and it will set the Magic Modem 1200's clock)
- (PS: Let me know what good the clock is for and why it is in the modem)